package com.bsj.travel.system.service;

import com.bsj.travel.def.common.DTO.web.user.UserDTO;
import com.bsj.travel.def.common.DTO.web.user.UserSearchDTO;
import com.bsj.travel.def.common.VO.UserTreeVO;
import com.bsj.travel.def.common.VO.UserVO;
import com.bsj.travel.def.global.JsonResult;
import com.bsj.travel.def.common.VO.TokenUser;

import java.util.List;

/***
 * @description SysUserService
 * @author LiJiaXin
 * @version 1.0.0
 * @time 2024/1/10 10:04
 **/
public interface SysUserService {

    /**
     * 登录
     *
     * @param userName
     * @param passWord
     * @return com.bsj.travel.def.common.VO.TokenUser
     * @author ljx
     * @time 2024/1/10 11:17
     */
    TokenUser login(String userName, String passWord);

    /**
     * 添加用户
     *
     * @param userDTO
     * @return com.bsj.travel.def.global.JsonResult
     * @author ljx
     * @time 2024/1/10 11:18
     */
    JsonResult addUser(UserDTO userDTO);

    /**
     * 修改用户
     *
     * @param userDTO
     * @return com.bsj.travel.def.global.JsonResult
     * @author ljx
     * @time 2024/1/10 11:19
     */
    JsonResult updateUser(UserDTO userDTO);

    /**
     * 根据用户id获取用户信息
     *
     * @param userId
     * @return com.bsj.travel.def.common.VO.UserVO
     * @author ljx
     * @time 2024/1/10 11:19
     */
    UserVO getUserInfoByUserId(Integer userId);

    /**
     * 删除用户
     *
     * @param userId
     * @return com.bsj.travel.def.global.JsonResult
     * @author ljx
     * @time 2024/1/10 11:20
     */
    JsonResult deleteUser(Integer userId);

    /**
     * 用户分页
     *
     * @param userSearchDTO
     * @return com.bsj.travel.def.global.JsonResult<java.util.List<com.bsj.travel.def.common.VO.UserVO>>
     * @author ljx
     * @time 2024/1/10 11:20
     */
    JsonResult<List<UserVO>> pageUser(UserSearchDTO userSearchDTO);

    /**
     * 获取用户树
     *
     * @param
     * @return com.bsj.travel.def.common.VO.UserTreeVO
     * @author ljx
     * @time 2024/1/10 11:20
     */
    UserTreeVO getUserTree();

    /**
     * 退出登录
     *
     * @param
     * @return com.bsj.travel.def.global.JsonResult
     * @author ljx
     * @time 2024/1/10 11:21
     */
    JsonResult userLogout();

    /**
     * 修改密码
     *
     * @param passWord
     * @param newPassWord
     * @return com.bsj.travel.def.global.JsonResult
     * @author ljx
     * @time 2024/1/10 11:21
     */
    JsonResult updatePassWord(String passWord, String newPassWord);

    /**
     * 根据用户名获取令牌信息
     *
     * @param userName
     * @return com.bsj.travel.def.global.JsonResult<com.bsj.travel.def.common.VO.TokenUser>
     * @author ljx
     * @time 2024/1/11 11:03
     */
    JsonResult<TokenUser> getTokenUserInfo(String userName);
}
